﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace LinuxTools
{
    public partial class FormHosts : Form
    {
        public FormHosts()
        {
            InitializeComponent();
        }

        private void btnConfirm_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            Form1.hosts = Util.getHostInfoList(tbHosts.Text);
            Utils.FileTools.WriteFile(tbHosts.Text, "host.txt");
            this.Close();
        }

        private void FormHosts_Load(object sender, EventArgs e)
        {
            tbHosts.Text = Util.ReadHostFile();
        }
    }
}
